<?php

declare(strict_types=1);

namespace App\CustHub\Request;

use Mine\MineFormRequest;

class SmartPushSchemeRequest extends MineFormRequest
{
    public function saveRules(): array
    {
        return [
            'title' => 'required',
            'corp_id' => 'required',
            'robot_ids' => 'required',
            'aud_cfg' => 'required',
            'content' => 'required',
            'push_type' => 'required|in:0,1,2',
            'cycle_cfg' => 'required',
            'push_tgt_switch' => 'in:0,1'
        ];
    }

    public function updateRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function getInfoRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function pauseTaskRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function startTaskRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function cancelTaskRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function pauseSubTaskRules(): array
    {
        return [
            'sub_scheme_id' => 'required'
        ];
    }

    public function startSubTaskRules(): array
    {
        return [
            'sub_scheme_id' => 'required'
        ];
    }

    public function cancelSubTaskRules(): array
    {
        return [
            'sub_scheme_id' => 'required'
        ];
    }

    public function getTaskListRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function getSubTaskListRules(): array
    {
        return [
            'id' => 'required',
        ];
    }

    public function getTargetListRules(): array
    {
        return [
            'id' => 'required',
        ];
    }

    public function getSendRecordRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function cancelTargetRules(): array
    {
        return [
            'id' => 'required',
            'sub_scheme_id' => 'required'
        ];
    }

    public function getStatsListRules(): array
    {
        return [
            'id' => 'required',
            'type' => 'required|in:0,1,2,3',
            'start_date' => 'required_if:type,3',
            'end_date' => 'required_if:type,3'
        ];
    }

    public function getDetailedDataListRules():array
    {
        return [
            'scheme_id' => 'required',
        ];
    }

    public function deleteRules()
    {
        return [
            'id' => 'required'
        ];
    }
}